def count(s,ch):
    n = 0
    len_ch = len(ch)
    len_str = len(s)
    begin = 0
    while begin < len_str:
        if ch == s[begin:begin + len_ch]:
            n += 1
            begin += len_ch
        begin += 1
    return n

def main():
    s = input("请输入字符串：")
    ch = input('请输入要查看的字符：')

    print(count(s,ch))
    print(s.count(ch))

main()